
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="../static/bootstrap-5.1.3-dist/css/bootstrap.min.css">
    <script type="text/javascript" src="../static/bootstrap-5.1.3-dist/js/bootstrap.min.js"></script>
    <title>用户登录</title>

</head>
<style>
    .login {
        height: 450px;
        width: 650px;
        /*border: #4d4d4d solid 1px;*/
        border-radius: 10px;
        box-shadow: 5px 7px 15px #5d5c5c;
        margin-top: 200px;
        margin-left: auto;
        margin-right: auto;
        padding: 20px 40px;
    }

    .login h1 {
        text-align: center;
    }

    .button {
        text-align: center;
        vertical-align: middle;
        margin-top: 20px;
    }
    .myImg{
        margin-left: 57%;
    }
</style>
<body>
<div class="login">
    <h1>登录</h1>

    <form  action="login" method="post">
        <div class="mb-3">
            <label >用户名</label>
            <div >
                <input type="text" name="name" lay-verify="title" autocomplete="off" class="form-control" placeholder="请输入用户名">
            </div>
        </div>
        <div class="mb-3">
            <label >密码</label>
            <div>
                <input type="password" name="pwd" autocomplete="off" class="form-control" placeholder="请输入密码">
            </div>
        </div>
        <div class="mb-3">
            <label>验证码</label>
            <div class="row">
                <div class="col-sm-6">
                    <input type="text" name="inputCode" lay-verify="title" class="form-control" autocomplete="off">
                </div>

                <div class="col-sm-3">
                    <img class="myImg" id="myImage" src="validCode" width="80" height="40" onclick="myReload()" title="看不清换一张">
                </div>
            </div>
        </div>
        <div class="mb-3">
            <label>登录身份</label>
            <div>
                <div class="row">
                    <div class="col-sm-2">
                        <input type="radio" name="status" value="1" title="用户" class="form-check-input"> 用户
                    </div>
                    <div class="col-sm-3">
                        <input type="radio" name="status" value="2" title="管理员" class="form-check-input"> 管理员
                    </div>

                </div>

            </div>
        </div>
        <div class="button" >
                <button type="submit" class="btn btn-primary btn-lg" style="margin-right: 50px">登 录</button>&nbsp;&nbsp;&nbsp;
                <a type="button" class="btn btn-secondary btn-lg" href="${pageContext.request.contextPath}/index.jsp" class=>返 回</a>
        </div>
    </form>

</div>
<script type="text/javascript">
    function myReload() {
        document.getElementById("myImage").src = "validCode?num=" + Math.random();
    }
</script>
</body>
</html>


